<?php if (!defined('BASEPATH'))
    exit('No direct script access allowed');
class Configuration_model extends AppModel
{
    var $_tablename = PARAMETER;   
	var $_primary_key = PARAMETER_PARAM_ID;
    
    
    public function Configuration_model()
    {
        parent::AppModel();
    }

    function get_lists($option, $limit = null, $offset = null, $sort_field = PARAMETER_PARAM_ID, $sort_type = 0)
    {
		return parent::get_lists(PARAMETER_FRANCHISE_ID . ' = ' . $this->admin_id . ' and ' . PARAMETER_NAME . " <> '" . TYPE_CONTACT_FORM . "' and " . PARAMETER_NAME . " <> '" . TYPE_MKT_SRC . "' and ".PARAMETER_USER_EDIT." = 'Y' and `".PARAMETER_OPTION."` = '".$option."'", $limit, $offset, $sort_field, $sort_type);
    }
    function get_contact_lists($limit = null, $offset = null, $sort_field = PARAMETER_PARAM_ID, $sort_type = 0){
		return parent::get_lists(PARAMETER_FRANCHISE_ID . ' = ' . $this->admin_id . ' and ' . PARAMETER_NAME . " like '" . TYPE_CONTACT_FORM . "'", $limit, $offset, $sort_field, $sort_type);
	}
	function get_mkt_src_lists($limit = null, $offset = null, $sort_field = PARAMETER_PARAM_ID, $sort_type = 0){
		return parent::get_lists(PARAMETER_FRANCHISE_ID . ' = ' . $this->admin_id . ' and ' . PARAMETER_NAME . " like '" . TYPE_MKT_SRC . "'", $limit, $offset, $sort_field, $sort_type);
	}
}
?>